import java.util.ArrayList;


public class Palindro {
//constructor
	public Palindro(){
		
	}
	
	/**
	 * 
	 * Check whether the number you input is a Palindrome.
	 * @param n the input number
	 * 
	 */
	public boolean isPalindro(int n){
		int num = n;
//		int remain = num % 10;
//		int divide = num / 10;
		
		ArrayList <Integer> iList = new ArrayList <Integer>();
		
//		if(num < 10 && num >= 0){
//			System.out.println("It's a Palindrome");
//			return true;
//			
//		}			
				
		
		while( num != 0){
			iList.add(num % 10);
			num = num / 10;
			
			}
		
		
//		iList.add(remain);
//		iList.add(divide);
		
		for(int i = 0; i < iList.size();i++){
							
				if(iList.get(i) != iList.get(iList.size()-1-i)){
					System.out.println("It's not Palindrome");
					return false;
				}
				
			}
	
		System.out.println("Its a Palindrome");
		return true;
	
		
	}
	
	
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Palindro palindro = new Palindro();
		palindro.isPalindro(191);
		
	}

}
